#include "network.h"
#include "iocp.h"
#include "epoll.h"
#include "memalloc.h"
#include "printer.h"

namespace Cross
{
#ifndef USE_GOOGLE_TCMALLOC
#ifdef _DEBUG
MemoryAllocator<true,true> *GetAllocator()
{
  static MemoryAllocator<true,true> mem;
  return &mem;
}
#else
MemoryAllocator<true,false> *GetAllocator()
{
  static MemoryAllocator<true,false> mem;
  return &mem;
}
#endif
#else//USE_GOOGLE_TCMALLOC
DummyAllocator* GetAllocator()
{
    static DummyAllocator mem;
    return &mem;
}
#endif//USE_GOOGLE_TCMALLOC
void ShowMemoryState(Printer* printer,bool usedOnly)
{
    SafeCacheState::ShowState(printer);
    FixedAllocatorState::ShowState(printer,usedOnly);
    AllocPad::Dump(printer);
}

}
